Share via


Logging.LogErrorCode Method (Int32, IFormatProvider, String, Object[])

Applies To: Windows 8.1

Logs an error code and custom message to AXE’s pre-configured ETW session.

Namespace: Microsoft.Assessments
Assembly: Microsoft.Assessments.Core (in Microsoft.Assessments.Core.dll)

Usage

'Usage
Dim instance As Logging
Dim errorCode As Integer
Dim provider As IFormatProvider
Dim messageFormat As String
Dim messageArguments As Object()

instance.LogErrorCode(errorCode, provider, messageFormat, messageArguments)

Syntax

'Declaration
Public Sub LogErrorCode ( _
    errorCode As Integer, _
    provider As IFormatProvider, _
    messageFormat As String, _
    ParamArray messageArguments As Object() _
)
public void LogErrorCode (
    int errorCode,
    IFormatProvider provider,
    string messageFormat,
    params Object[] messageArguments
)
public:
void LogErrorCode (
    int errorCode, 
    IFormatProvider^ provider, 
    String^ messageFormat, 
    ... array<Object^>^ messageArguments
)
public void LogErrorCode (
    int errorCode, 
    IFormatProvider provider, 
    String messageFormat, 
    Object[] messageArguments
)
public function LogErrorCode (
    errorCode : int, 
    provider : IFormatProvider, 
    messageFormat : String, 
    ... messageArguments : Object[]
)

Parameters

  • errorCode
    The HRESULT error code to log.
  • provider
    Provides a mechanism for retrieving an object to control formatting.
  • messageFormat
    An optional string value that can be a FormatMessage format string used for formatting custom messages.
  • messageArguments
    A variable argument list to be used with the messageFormat parameter.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows 8.1

See Also

Reference

Logging Class
Logging Members
Microsoft.Assessments Namespace